Image capturing device and method for calibrating image defection thereof

ABSTRACT

A method for calibrating image defection of an image capturing device having a first and second lens, a focusing actuator, and a prestored first focusing step-to-focusing distance relation includes the following steps. A plurality of image sets are captured by the first and second lens, where each of the image sets includes a first and second image, and the images sets include a reference image set. It is detected whether the reference image set is defective. When the reference image set is detected to be defective, the first focusing step-to-focusing distance relation is calibrated according to a focusing step and a focusing distance corresponding to each of the image sets, where the focusing step corresponding to each of the image sets is the number of steps that the focusing actuator is required to move the first and second lens to a focusing position to generate each of the image sets.

CROSS-REFERENCE TO RELATED APPLICATION

This application is a continuation application of and claims thepriority benefit of a prior U.S. application Ser. No. 14/304,985, filedon Jun. 16, 2014, now pending. The prior U.S. application Ser. No.14/304,985 claims the priority benefit of Taiwan application serial no.103103261, filed on Jan. 28, 2014. The entirety of each of theabove-mentioned patent applications is hereby incorporated by referenceherein and made a part of this specification.

BACKGROUND OF THE INVENTION

Field of the Invention

The invention relates to an image capturing device, and moreparticularly, relates to a method for calibrating image defection of animage capturing device.

Description of Related Art

With development in technology, various smart image capturing devices,such as tablet computers, personal digital assistants and smart phones,have become indispensable tools for people nowadays. Camera lensesequipped in high-end smart image capturing devices provide same orbetter specifications than those of traditional consumer cameras, andsome even provide three-dimensional image capturing features ornear-equivalent pixel qualities to those of digital single lens reflexcameras.

Generally, during an autofocusing procedure, an image capturing devicemay be focused by adjusting positions of lenses through a focusingactuator such as a stepping motor, a voice coil motor (VCM) and so on.Hence, before such image capturing device leaves the factory, acorresponding relation between a focusing distance of a target and amoving step of the focusing actuator may be archived into a conversiontable and pre-stored in the image capturing device. Accordingly, whenthe image capturing device executes the autofocusing procedure on anarbitrary target, the focusing distance of such target may be obtainedaccording to depth information thereof, so that the number of steps thatthe focusing actuator is required to move may be acquired and the lensesmay be adjusted accordingly. However, in practical use, deformation oroffset usually occurs on the lenses and the focusing actuator of theimage capturing device due to external factors such as drop-offs, bumps,squeezes, changes in temperatures or humidity. The auto-focusingprocedure may thus cause errors when the image capturing device capturesimages.

SUMMARY OF THE INVENTION

Accordingly, the invention is directed to an image capturing device anda method for calibrating the image defection thereof, which are capableof detecting whether a deformation or an offset occurs on a first lens,a second lens and a focusing actuator and calibrating the imagecapturing device at any time, so as to ensure a stable quality of theimage capturing device.

The invention proposes a method for calibrating image defection of animage capturing device having first and second lenses, a focusingactuator and a pre-stored first focusing step-to-focusing distancerelation, and the method for calibrating image defection includes thefollowing steps. First, a plurality of image sets are captured byutilizing the first lens and the second lens, where each of the imagesets includes a first image corresponding to the first lens and a secondimage corresponding to the second lens. The image sets include areference image set, and the reference image set includes a firstreference image corresponding to the first lens and a second referenceimage corresponding to the second lens. Next, it is detected whether thereference image set is defective. When the reference image set isdetected to be defective, the first focusing step-to-focusing distancerelation is calibrated according to a focusing step and a focusingdistance corresponding to a focus target in each of the image sets,where the focusing step corresponding to the focus target in each of theimage sets is the number of steps that the focusing actuator is requiredto move the first lens and the second lens to a focusing position forgenerating each of the image sets.

In an embodiment of the invention, the step of detecting whether thereference image set is defective includes: detecting image coordinatesof a feature point respectively on the first reference image and thesecond reference image of the reference image set; determining whetheran offset between the image coordinates of the feature pointrespectively on the first reference image and the second reference imageexceeds a threshold; and if yes, determining that the reference imageset is defective.

In an embodiment of the invention, the step of detecting whether thereference image set is defective includes: performing athree-dimensional depth estimation on the first reference image and thesecond reference image to generate reference depth information of areference focus target in the reference image set; obtaining a focusingdistance corresponding to the reference focus target according to thereference depth information; determining whether a focusing step and thefocusing distance corresponding to the reference focus target satisfythe first focusing step-to-focusing distance relation; and if no,determining that the reference image set is defective.

In an embodiment of the invention, the step of detecting whether thereference image set is defective includes: detecting whether the firstreference image and the second reference image is out of focus; when atleast one of the first reference image and the second reference image isout of focus, determining that the reference image set is defective.

In an embodiment of the invention, when the reference image set isdetected to be defective, before the step of calibrating the firstfocusing step-to-focusing distance relation according to the focusingstep and the focusing distance corresponding to the focus target in eachof the image sets, the method for calibrating image defection furtherincludes the following steps. A focusing condition of the imagecapturing device is detected, where the focusing condition includes afar focusing condition and a near focusing condition.

In an embodiment of the invention, when the reference image set isdetected to be defective and the focusing condition is the far focusingcondition, the step of calibrating the first focusing step-to-focusingdistance relation according to the focusing step and the focusingdistance corresponding to the focus target in each of the image setsincludes: recording the focusing step corresponding to the focus targetin each of the image sets; and when the focusing step corresponding tothe focus target in each of the image sets reaches a convergent value,obtaining a minimum focusing step in the first focusing step-to-focusingdistance relation, and calculating a difference value between theminimum focusing step and the convergent value for calibrating the firstfocusing step-to-focusing distance relation.

In an embodiment of the invention, when the reference image set isdetected to be defective and the focusing condition is the near focusingcondition, the step of calibrating the first focusing step-to-focusingdistance relation according to the focusing step and the focusingdistance corresponding to the focus target in each of the image setsincludes: performing a three-dimensional depth estimation on each of theimage sets to generate depth information of the focus target in each ofthe image sets; obtaining the focusing distance corresponding to thefocus target in each of the image sets according to each of the depthinformation; and performing a regression according to the focusingdistance and the focusing step corresponding to the focus target in eachof the image sets, and calibrating the first focusing step-to-focusingdistance relation according to a result of the regression.

In an embodiment of the invention, the step of calibrating the firstfocusing step-to-focusing distance relation according to the focusingstep and the focusing distance corresponding to the focus target in eachof the image sets includes: defining the focusing distance and thefocusing step corresponding to the focus target in each of the imagesets as a data point; categorizing the data points to a plurality ofneighboring data groups according to the focusing distances; performingweighted average computation on the data points in each of the datagroups to generate a weighted average data point corresponding to eachof the neighboring data groups; and performing the regression on theweighted average data points.

The invention also proposes an image capturing device including a firstlens, a second lens, a focusing actuator, a storage unit and one or moreprocessing units, where the focusing actuator is coupled to the firstlens and the second lens, and the processing unit(s) is coupled to thefirst lens, the second lens, the focusing actuator, and the storageunit. The storage unit is configured to record a plurality of modulesand a first focusing step-to-focusing distance relation. The processingunit is configured to access and execute the modules recorded in thestorage unit. The modules include an image capturing module, a focusingmodule, a defect detection module, and a calibrating module. The imagecapturing module captures a plurality of image sets by utilizing thefirst lens and the second lens, where each of the image sets includes afirst image corresponding to the first lens and a second imagecorresponding to the second lens. The image sets include a referenceimage set, and the reference image set includes a first reference imagecorresponding to the first lens and a second reference imagecorresponding to the second lens. The focusing module is configured tocontrol the focusing actuator to move the first lens and the second lensto a focusing position. The defect detection module is configured todetect whether the reference image set is defective. When the defectdetection module detects that the reference image set is defective, thecalibrating modules calibrates the first focusing step-to-focusingdistance relation according to a focusing step and a focusing distancecorresponding to a focus target in each of the image sets, where thefocusing step corresponding to the focus target in each of the imagesets is the number of steps that the focusing actuator is required tomove the first lens and the second lens to a focusing position forgenerating each of the image sets.

In an embodiment of the invention, the defect detection module detectsimage coordinates of a feature point respectively on the first referenceimage and the second reference image of the reference image set,determines whether an offset between the image coordinates of thefeature point respectively on the first reference image and the secondreference image exceeds a threshold, and if yes, the defect detectionmodule determines that the reference image set is defective.

In an embodiment of the invention, the defect detection module performsa three-dimensional depth estimation on the first reference image andthe second reference image to generate reference depth information of areference focus target in the reference image set, obtains a focusingdistance corresponding to the reference focus target according to thereference depth information, determines whether a focusing step and thefocusing distance corresponding to the reference focus target satisfythe first focusing step-to-focusing distance relation, and if no, thedefect detection module determines that the reference image set isdefective.

In an embodiment of the invention, the defect detection module detectswhether the first reference image and the second reference image are outof focus. When at least one of the first reference image and the secondreference image is out of focus, the defect detection module determinesthat the reference set is defective.

In an embodiment of the invention, the image capturing device furtherincludes a condition detection module configured to detect a focusingcondition of the image capturing device, where the focusing conditionincludes a far focusing condition and a near focusing condition.

In an embodiment of the invention, when the focusing condition is thefar focusing condition, the calibrating module records the focusing stepcorresponding to a focus target in each of the image sets. When thefocusing step corresponding to the focus target in each of the imagesets reaches a convergent value, the calibrating module obtains aminimum focusing step in the first focusing step-to-focusing distancerelation, and calculates a difference value between the minimum focusingstep and the convergent value for calibrating the first focusingstep-to-focusing distance relation.

In an embodiment of the invention, when the focusing condition is thenear focusing condition, the calibrating module performs a threedimensional depth estimation on each of the image sets to generate depthinformation of the focus target in each of the image sets, obtains thefocusing distance corresponding to the focus target in each of the imagesets according to each of the depth information, performs a regressionaccording to the focusing distance and the focusing step correspondingto the focus target in each of the image sets, and calibrates the firstfocusing step-to-focusing distance relation according to a result of theregression.

In an embodiment of the invention, the calibrating module further setsthe focusing distance and the focusing step corresponding to the focustarget in each of the image sets as a data point, categorizes the datapoints to a plurality of neighboring data groups according to thefocusing distances, performs weighted average computation on the datapoints in each of the data groups to generate a weighted average datapoint corresponding to each of the neighboring data groups, and performsthe regression on the weighted average data points.

The invention proposes another method for calibrating image defection ofan image capturing device having first and second lenses, a focusingactuator and a pre-stored first focusing step-to-focusing distancerelation, and the method for calibrating image defection includes thefollowing steps. First, a plurality of image sets are captured byutilizing the first lens and the second lens, where each of the imagesets includes a first image corresponding to the first lens and a secondimage corresponding to the second lens, and where the step of capturingeach of the image sets includes utilizing the focusing actuator to movethe first lens so as to provide maximum clarity to a focus target ineach of the first images. Next, a focusing distance according to depthinformation of the focus target in each of the first images is obtained.The first focusing step-to-focusing distance relation is calibratedaccording to a focusing step and the focusing distance corresponding tothe focus target in each of the first images, where the focusing stepcorresponding to the focus target in each of the first images is thenumber of steps that the focusing actuator moves the first lens and thesecond lens for generating each of the first images.

In an embodiment of the invention, the step of capturing each of theimage sets further comprises utilizing the focusing actuator to move thefirst lens and the second lens so as to provide maximum clarity to thefocus target in each of the image sets, and the method further includesthe following steps. First, another focusing distance according toanother depth information of the focus target in each of the image setsis obtained. The first focusing step-to-focusing distance relation iscalibrated according to another focusing step and the another focusingdistance corresponding to the focus target in each of the image sets,where the another focusing step corresponding to the focus target ineach of the image sets is the number of steps that the focusing actuatormoves the first lens and the second lens for generating each of theimage sets.

The invention proposes another image capturing device including a firstlens, a second lens, a focusing actuator, a storage unit and one or moreprocessing units, where the focusing actuator is coupled to the firstlens and the second lens, and the processing unit(s) is coupled to thefirst lens, the second lens, the focusing actuator, and the storageunit. The storage unit is configured to record a plurality of modulesand a first focusing step-to-focusing distance relation. The processingunit is configured to access and execute the modules recorded in thestorage unit. The modules include an image capturing module, a focusingmodule, a defect detection module, and a calibrating module. The imagecapturing module captures a plurality of image sets by utilizing thefirst lens and the second lens, where each of the image sets includes afirst image corresponding to the first lens and a second imagecorresponding to the second lens. The focusing module is configured tocontrol the focusing actuator to move the first lens so as to providemaximum clarity to a focus target in each of the first images. Thedefect detection module is configured to obtain a focusing distanceaccording to depth information of the focus target in each of the firstimages. The calibrating module is configured to calibrate the firstfocusing step-to-focusing distance relation according to a focusing stepand the focusing distance corresponding to the focus target in each ofthe first images, where the focusing step corresponding to the focustarget in each of the first images is the number of steps that thefocusing actuator moves the first lens for generating each of the firstimages.

In an embodiment of the invention, the focusing module further controlsthe focusing actuator to move the first lens and the second lens so asto provide maximum clarity to the focus target in each of the imagesets. The defect detection module further obtains another focusingdistance according to another depth information of the focus target ineach of the image sets. The calibrating module further calibrates thefirst focusing step-to-focusing distance relation according to anotherfocusing step and the another focusing distance corresponding to thefocus target in each of the image sets, where the another focusing stepcorresponding to the focus target in each of the image sets is thenumber of steps that the focusing actuator moves the first lens and thesecond lens for generating each of the image sets.

Based on the image capturing device and the method for calibrating theimage defection thereof as proposed by the invention, when a deformationor an offset occurs on a first lens, a second lens and the focusingactuator of the image capturing device, the image capturing module iscapable of calibrating the first focusing step-to-focusing distancerelation pre-stored in the image capturing device according to thefocusing distance corresponding to the focus target in each of the imagesets captured by the first lens and the second lens as well as thefocusing step that the focusing actuator is required to move the firstlens and the second lens to the focusing position. The image capturingdevice and the method for calibrating the image defection thereof asproposed in the invention may allow for a simple and quick automaticcalibration on the image capturing device without even being noticed bythe user when a plurality of image sets are captured by the imagecapturing module, so as to ensure a stable quality of the imagecapturing device and enhance user experience.

To make the above features and advantages of the disclosure morecomprehensible, several embodiments accompanied with drawings aredescribed in detail as follows.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram illustrating an image capturing deviceaccording to an embodiment of the invention.

FIG. 2 is a flowchart illustrating a method for calibrating imagedeformation of the image capturing device according to an embodiment ofthe invention.

FIG. 3 is a flowchart illustrating a method for calibrating imagedeformation of the image capturing device according to an embodiment ofthe invention.

FIG. 4 illustrates a schematic diagram of calibrating the first focusingstep-to-focusing distance relation according to an embodiment of theinvention.

FIGS. 5A-5D illustrate schematic diagrams of calibrating the firstfocusing step-to-focusing distance relation according to an embodimentof the invention.

FIG. 6 is a flowchart illustrating a method for calibrating imagedefocus of the image capturing device according to an embodiment of theinvention.

FIG. 7 is a flowchart illustrating a method for calibrating imagedefection of the image capturing device according to an embodiment ofthe invention.

FIG. 8 is a block diagram illustrating an image capturing deviceaccording to another embodiment of the invention.

FIG. 9 is a flowchart illustrating a method for calibrating imagedefection of the image capturing device according to an embodiment ofthe invention.

FIG. 10 is a flowchart illustrating another method for calibrating imagedefection of the image capturing device according to an embodiment ofthe invention.

DESCRIPTION OF THE EMBODIMENTS

Reference will now be made in detail to the present embodiments of theinvention, examples of which are illustrated in the accompanyingdrawings. Wherever possible, the same reference numbers are used in thedrawings and the description to refer to the same or like parts. Inaddition, the specifications and the like shown in the drawing figuresare intended to be illustrative, and not restrictive. Therefore,specific structural and functional detail disclosed herein are not to beinterpreted as limiting, but merely as a representative basis forteaching one skilled in the art to variously employ the presentinvention.

FIG. 1 is a block diagram illustrating an image capturing deviceaccording to an embodiment of the invention. It should, however, benoted that this is merely an illustrative example and the presentinvention is not limited in this regard. All components of the imagecapturing device and their configurations are first introduced inFIG. 1. The detailed functionalities of the components are disclosedalong with FIG. 2.

Referring to FIG. 1, an image capturing device 100 includes a first lens10 a, a second lens 10 b, a focusing actuator 15, a storage unit 20 andone or more processing units 30. In the present embodiment, the imagecapturing device 100 is, for example, a digital camera, a digitalcamcorder, a digital single lens reflex camera or other devices providedwith an image capturing feature such as a smart phone, a tabletcomputer, a personal digital assistant, a head mount display, and so on.The invention is not limited herein.

Each of the first lens 10 a and the second lens 10 b includes opticalsensing elements for sensing light intensity entering the first lens 10a and the second lens 10 b respectively, so as to generate a first imageand a second image. The optical sensing elements are, for example,charge-coupled-device (CCD) elements, complementary metal-oxidesemiconductor (CMOS) elements, and yet the invention is not limitedthereto.

The focusing actuator 15 is coupled to the first lens 10 a and thesecond lens 10 b. The focusing actuator 15 may be, for example, astepping motor, a voice coil motor (VCM), a piezoelectric actuator, orother actuators capable of mechanically moving the first lens 10 a andthe second lens 10 b for focusing, and yet the invention is not limitedherein.

The storage unit 20 may be one or a combination of a stationary ormobile random access memory (RAM), a read-only memory (ROM), a flashmemory, a hard drive or other similar devices. The storage unit 20 isconfigured to record a plurality of modules executable by the processingunit 30, where the modules may be loaded into the processing unit 30 forcalibrating the image capturing device 100.

The processing unit 30 may be, for example, a central processing unit(CPU) or other programmable devices for general purpose or specialpurpose such as a microprocessor and a digital signal processor (DSP), aprogrammable controller, an application specific integrated circuit(ASIC), a programmable logic device (PLD) or other similar devices or acombination of above-mentioned devices. The processing unit 30 iscoupled to the first lens 10 a, the second lens 10 b, the focusingactuator 15 and the storage unit 20, and capable of accessing andexecuting the modules recorded in the storage unit 20 for calibratingthe image capturing device 100.

The modules include an image capturing module 122, a focusing module124, a defect detection module 126 and a calibrating module 128 and maybe loaded into the processing unit 30 for calibrating the imagecapturing device 100. The detailed steps of calibrating the imagecapturing device 100 are illustrated in the embodiments hereinafter.

FIG. 2 is a flowchart illustrating a method for calibrating imagedeformation of an image capturing device according to an embodiment ofthe invention, and the method for calibrating image deformation of theimage capturing device of FIG. 2 may be implemented by the elements inthe image capturing device 100 of FIG. 1.

Referring to both FIG. 1 and FIG. 2, the image capturing module 122captures a plurality of image sets by utilizing the first lens 10 a andthe second lens 10 b, where the image sets include a reference image set(step S201). The first lens 10 a and the second lens 10 b may capturethe image sets with the same parameters, where the parameters includefocal lengths, apertures, shutters, and so on, which are notparticularly limited in the invention. The image sets captured by theimage capturing module 122 are, for example, a plurality of previewimage sets, and each of the image sets includes a first imagecorresponding to the first lens 10 a and a second image corresponding tothe second lens 10 b. One of the image sets (i.e., the aforementionedreference image set) will be described hereafter. The reference imageset includes a first reference image corresponding to the first lens 10a and a second reference image corresponding to the second lens 10 b.

Next, the defect detection module 126 detects whether the referenceimage set is deformed (step S203). The defect detection module 126 maydetermine whether the reference image set is deformed according to anoffset of an arbitrary feature point of the reference image set or athree-dimensional depth estimation on the reference image set, and yetthe invention is not limited thereto.

To be specific, in one embodiment, the defect detection module 126 maydetect the arbitrary feature point of the reference image set accordingto a conventional feature detection algorithm, and determine whether theoffset between image coordinates of the feature point respectively onthe first reference image and the second reference image exceeds athreshold, so as to detect whether the reference image set is deformed.In the present embodiment, after the defect detection module 126 detectsthe feature point, it may determine whether a vertical offset (i.e., adifference in Y-axis coordinate) between the image coordinates of thefeature point respectively on the first reference image and the secondreference image exceeds the threshold. When the defect detection module126 determines that the offset between the image coordinates of thefeature point of the reference image set does not exceed the threshold,it indicates that the reference image set is not deformed. The imagecapturing device 100 may end the method for calibrating imagedeformation. Otherwise, when the defect detection module 126 determinesthat the offset between the image coordinates of the feature point ofthe reference image set exceeds the threshold, it indicates that thereference image set is deformed, and the image capturing device 100 maycontinue to execute the method for calibrating image deformation.

From another perspective, before the reference image set is captured bythe image capturing module 122, the focusing module 124 may control thefocusing actuator 15 to move the first lens 10 a and the second lens 10b to a focusing position by applying an autofocusing technique such as ahill-climbing algorithm, so as to adjust a distance between the firstlens 10 a and an object and a distance between the second lens 10 b andthe object, so as to obtain the capturing object with a maximumresolution. The object with the maximum resolution in the referenceimage set may be referred to as a “reference focus target.” In thepresent embodiment, the defect detection module 126 may determinewhether the reference image set is deformed according to depthinformation of the reference focus target. More specifically, the defectdetection module 126 may process the reference image set through astereo vision technique to obtain the depth information of the referencefocus target in a spatial domain, and obtain an object distance of thereference focus target (i.e., a focusing distance of the reference focustarget) according to the depth information.

It should be noted that, the closer the object is to the image capturingdevice 100, the greater the number of steps that the focusing actuator15 is required to move the first lens 10 a and the second lens 10 b tothe focusing position is greater; the farther the object is from theimage capturing device 100, the less the number of steps that thefocusing actuator 15 is required to move the first lens 10 a and thesecond lens 10 b to the focusing position. Therefore, there exists acorresponding relation between the focusing distance of the capturingobject and the number of steps to be moved by the focusing actuator 15,and such corresponding relation is referred to as a “first focusingstep-to-focusing distance relation.” The first focusing step-to-focusingdistance relation may be pre-stored in the storage unit 20 as a look-uptable (LUT), where an input index of the look-up table is a focusingdistance, and an output of the look-up table is a focusing step.However, when deformation or offset occurs on the first lens 10 a, thesecond lens 10 b and the focusing actuator 15, the first focusingstep-to-focusing distance relation pre-stored in the storage unit 20becomes unreliable.

Accordingly, the defect detection module 126 may determine whether thefocusing step and the focusing distance corresponding to the referencefocus target satisfy the first focusing step-to-focusing distancerelation pre-stored in the storage unit 20. In other words, the defectdetection module 126 may determine whether the focusing distanceobtained according to the depth information and the number of steps thatthe focusing module 124 is required to move the first lens 10 a and thesecond lens 10 b for obtaining the reference image set satisfy the firstfocusing step-to-focusing distance relation. When the defect detectionmodule 126 determines that the focusing step and the focusing distancecorresponding to the reference focus target satisfy the first focusingstep-to-focusing distance relation, it indicates that the referenceimage set is deformed, and the image capturing device 100 may end themethod for calibrating image deformation. Otherwise, when the defectdetection module 126 determines that the focusing step and the focusingdistance corresponding to the reference focus target do not satisfy thefirst focusing step-to-focusing distance relation, it indicates that thereference image set is deformed, and the image capturing device 100 maycontinue to execute the method for calibrating image deformation.

When the defect detection module 126 detects that the reference imageset is deformed, the calibrating module 128 calibrates the firstfocusing step-to-focusing distance relation according to a focusing stepand a focusing distance corresponding to a focus target in each of theimage sets (step S205), so as to complete the calibration process.Herein, the calibrating module 128 may calibrate the first focusingstep-to-focusing distance relation according to images with differentfocusing distances. Detailed steps regarding the above will be describedalong with embodiments hereafter.

FIG. 3 is a flowchart illustrating a method for calibrating imagedeformation of the image capturing device according to an embodiment ofthe invention. In the present embodiment, the image capturing device 100further includes a condition detection module (not shown), configured todetect a focusing condition of the image capturing device 100 forcalibrating the first focusing step-to-focusing distance relation indifferent manners.

Referring to both FIG. 1 and FIG. 3, first, the image capturing module122 captures a plurality of image sets by utilizing the first lens 10 aand the second lens 10 b, where the image sets include a reference imageset (step S301). Next, the defect detection module 126 detects whetherthe reference image set is deformed (step S303). Descriptions for stepS301 and step S303 may refer to the related descriptions in step S201and step S203, which may not be repeated hereinafter. When the defectdetection module 126 detects that the reference image set is deformed,the image capturing device 100 may end the method for calibrating imagedeformation. Otherwise, when the defect detection module 126 detectsthat the image deformation occurs on the reference image set, thecondition detection module detects a focusing condition of the imagecapturing device 100 (step S305). Herein, the focusing conditionincludes a far focusing condition and a near focusing condition. To bespecific, when the image capturing module 122 obtains, for example, aplurality of preview image sets by utilizing the first lens 10 a and thesecond lens 10 b, the condition detection module may detect whethercontent of the image sets captured by the image capturing device 100 isa far-scene image or a near-scene image. For example, the far scene maybe an outdoor scene, and the near scene may be an indoor scene. Thecondition detection module may detect the brightness of an ambient lightsource, recognize a scene of image content by leveraging a patternrecognition algorithm, or use the parameters adopted by the first lens10 a and the second lens 10 b for determining the focusing condition,and yet the invention is not limited thereto.

When the condition detection module determines that the focusingcondition is the far focusing condition, the calibrating module 128records the focusing step corresponding to a focus target in each of theimage sets (step S307). To be specific, because each the image setscaptured is captured by the image capturing module 122 under the farfocusing condition, an object with a maximum resolution (referred to asa “focus object”) in each of the image sets is located at an infinityposition with respect to the first lens 10 a and the second lens 10 b.In the present embodiment, the infinity position may be a position thatis more than 5 meters away from the first lens 10 a and the second lens10 b. The calibrating module 128 records the number of steps that theimage capturing module 122 is required to move the first lens 10 a andthe second lens 10 b for capturing the image with an infinity focusingdistance.

When the focusing step corresponding to the focus target in each of theimage sets reaches a convergent value, the calibrating module 128obtains a minimum focusing step in the first focusing step-to-focusingdistance relation (step S309), and calculates a difference value betweenthe minimum focusing step and the convergent value for calibrating thefirst focusing step-to-focusing distance relation (step S311). To bespecific, within a range of the focusing distance, a negative linearrelationship is found in the first focusing step-to-focusing distancerelation. When the focusing step corresponding to each of image setswith the far-scene image captured by image capturing module 122converges to a minimum value, said convergent value represents thenumber of steps that the focusing actuator 15 is required to move forfocusing the focus object at the infinity position. Subsequently, thecalibrating module 128 may obtain a minimum focusing step in the firstfocusing step-to-focusing distance relation, and calibrate the firstfocusing step-to-focusing distance relation according to the differencevalue between the minimum focusing step and the convergent value.

For instance, Table 1 lists numbers of steps that focusing actuator 15is required to move in order to capture ten sets of the far-scene image.

TABLE 1 Image Sets 1 2 3 4 5 6 7 8 9 10 Focusing Step 308 310 300 303307 301 303 300 301 300

In Table 1, the corresponding focusing steps of all the ten far-sceneimage sets captured by the image capturing module 122 converge to 300;namely, the convergent value is 300. The calibrating module 128 maycalibrate the first focusing step-to-focusing distance relation by suchconvergent value.

FIG. 4 illustrates a schematic diagram of calibrating the first focusingstep-to-focusing distance relation according to an embodiment of theinvention.

Referring to FIG. 4, a straight line 41 represents a first focusingstep-to-focusing distance relation with the focusing distance rangedfrom 0.2 meter to 5 meters, where the focusing step corresponding to thefocusing distance of 0.2 meter is 600, and the focusing stepcorresponding to the focusing distance of 5 meters is 200. In otherwords, in the present embodiment, the minimum focusing step is 200. Inthe example of Table 1, since the focusing step corresponding to theimage sets with the far-scene image captured by the image capturingmodule 122 converges to 300, the calibrating module 128 may determinethat the focusing step is a focusing step corresponding to the focusingdistance of 5 meters, which may be represented by a point 421. Thecalibrating module 128 may calibrate the first focusing step-to-focusingdistance relation according to a shortest distance between the point 421and the straight line 41. In brief, the shortest distance is adifference value between the minimum focusing step and the convergentvalue in the Y-axis direction, and the calibrating module 128 maycalibrate the first focusing step-to-focusing distance relationaccording to the difference value.

Take FIG. 4 as an example, the calibrating module 128 may shift thestraight line 41 towards Y-axis in the positive direction, so that thestraight line 41 is moved upwardly until overlapping with the point 421.A final position of the straight line 41 is where a straight line 42 islocated, where the straight line 42 represents a new focusingstep-to-focusing distance relation. The calibrating module 128 mayreplace the first focusing step-to-focusing distance relation pre-storedin the storage unit 20 with the new focusing step-to-focusing distancerelation to complete the calibration process.

When the condition detection module determines that the focusingcondition is the near focusing condition, the calibrating module 128performs a three-dimensional depth estimation on each of the image setsto generate depth information of the focus target in each of the imagesets (step S313), and obtains the focusing distance corresponding to thefocus target in each of the image sets according to each of the depthinformation (step S315). More specifically, the calibrating module 28may process each of the image sets through the stereo vision techniqueto obtain the depth information of the focus target in each of the imagesets in a spatial domain, and obtain an object distance of the focustarget (i.e., a focusing distance of the focus target) according to thedepth information.

Next, the calibrating module 128 performs a regression according to thefocusing distance and the focusing step corresponding to the focustarget in each of the image sets as well as calibrates the firstfocusing step-to-focusing distance relation according to a result of theregression calculation (step S317). In other words, the calibratingmodule 128 may perform a regression analysis on multiple sets of thefocusing distance and the focusing step being collected. In the presentembodiment, because a negative linear relationship is found in the firstfocusing step-to-focusing distance relation, the calibrating module 128may fit a linear regression model to find a fitted regression line ofthe sets of the focusing distance and the focusing step for replacingthe first focusing step-to-focusing distance relation.

For instance, FIG. 5A and FIG. 5B illustrate schematic diagrams ofcalibrating the first focusing step-to-focusing distance relationaccording to an embodiment of the invention. Referring to FIG. 5A, astraight line 51 represents a first focusing step-to-focusing distancerelation with the focusing distance ranged from 0.2 meter to 5 meters,where the focusing step corresponding to the focusing distance of 0.2meter is 600, and the focusing step corresponding to the focusingdistance of 5 meters is 200. After eleven image sets are captured by theimage capturing module 122, focusing distances and focusing steps of theeleven image sets are represented by points 521 to 531. In the presentembodiment, the calibrating module 128 may perform a regression analysison the points 521 to 531 by fitting a least square regression model.However, in other embodiment, the calibrating module 128 may perform theregression analysis by fitting other linear regression models. Theinvention is not limited herein. A fitted regression line computed bythe calibrating module 128 after performing the regression analysis onthe points 521 to 531 is a straight line 52 as illustrated in FIG. 5B,which represents a new focusing step-to-focusing distance relation.

In another embodiment, assume that the focusing distance and thefocusing step corresponding to the focus target in each of the image maybe as a data point. Before the calibrating module 128 performsregression, it may perform data clustering on the neighboring datapoints according to the focusing distances so as to categorize the datapoints to a plurality of neighboring data groups. Next, the calibratingmodule 128 may perform regression on the neighboring data groups andaccordingly calculate a fitted regression line.

For example, FIG. 5C and FIG. 5D illustrate schematic diagrams ofcalibrating the first focusing step-to-focusing distance relationaccording to an embodiment of the invention. Referring to FIG. 5C, inthe present embodiment, before the calibrating module 128 performsregression analysis, it may categorize points 521-531 into five groups,i.e., the point 521, the points 522-523, the points 524-525, the points526-528, and the points 529-531. Referring to FIG. 5D, the calibratingmodule 128 may perform weighted average computation on the data pointsin the five groups to generate a weighted average data point belongingto each of the five groups, i.e., N1-N5. A fitted regression linecomputed by the calibrating module 128 after performing the regressionanalysis on the points N1-N5 is a straight line 53 as illustrated inFIG. 5D, where the straight line 53 corresponds to a new focusingstep-to-focusing distance relation.

Next, the calibrating module 128 may then replace the first focusingstep-to-focusing distance relation pre-stored in the storage unit 20with the new focusing step-to-focusing distance relation to complete thecalibration process.

Additionally, in another embodiment, when the image capturing unit 122captures the image sets under both of the far focusing condition and thenear focusing condition, the calibrating module 128 may first executesteps S313 to S317 for the images captured under the near focusingcondition to calibrate the first focusing step-to-focusing distancerelation, and then execute steps S307 to S311 for the images capturedunder the far focusing condition to further calibrate the new focusingstep-to-focusing distance relation for a more precise result. In anotherembodiment, the calibrating module 128 may first execute steps S307 toS311 for the images captured under the far focusing condition tocalibrate the first focusing step-to-focusing distance relation, andthen execute steps S313 to S317 for the images obtained under the nearfocusing condition to further calibrate the new focusingstep-to-focusing distance relation. The invention is not limited to theabove.

FIG. 3 and FIG. 4. mainly focus on performing calibration due to imagedeformation. In another embodiment, when images are out of focus due todistortion or displacement of the focusing actuator 15, anothercalibration may be performed on the image capturing device based on amethod for calibrating image defocus of an image capturing deviceaccording to an embodiment of the invention as illustrated in FIG. 6.The method for calibrating image defocus of an image capturing device isalso adapted to the image capturing device as illustrated in FIG. 1.

Referring to both FIG. 1 and FIG. 6, first, the image capturing module122 captures a plurality of image sets by utilizing the first lens 10 aand the second lens 10 b, where the image sets include a reference imageset (step S601). Descriptions for step S601 may refer to the relateddescriptions in step S201, which may not be repeated hereinafter.

Next, the defect detection module 126 detects whether the referenceimage set is out of focus (step S603). To be specific, similar to theembodiment in FIG. 2, before the image capturing module 122 captures thereference image set, the focusing module 124 has already moved the firstlens 10 a and the second lens 10 b to a focusing position by using thefocusing actuator 15 through an autofocusing technique so as to adjustthe distance between an object and the first lens 10 a as well as thesecond lens 10 b. However, when the focusing actuator 15 is distorted ordisplaced, the first focusing step-to-focusing distance relationprestored in the storage unit 20 is not reliable so that the referenceimage set captured by the image capturing module 122 may be out of focus(e.g., blur).

Accordingly, the defect detection module 126 may, for example, determinewhether the first reference image and the second reference image in thereference image set satisfy a clarity condition so as to determinewhether the reference image set is out of focus or in focus. In thepresent embodiment, the clarity condition may be determined by imageclarity information (e.g., clarity values) based on sharpness orcontrast of an image or obtained via edge detection, and yet theinvention is not limited herein. The defect detection module 126 maydetermine whether the clarity values of the first reference image andthe second reference image are greater than a predetermined clarityvalue. When both of the first reference image and the second referenceimage are greater than the predetermined clarity vale (i.e., both imagessatisfy the clarity condition), it indicates that the reference imageset is not out of focus, and the image capturing device 100 may end theflow for calibrating image defocus.

When at least one of the first reference image and the second referenceimage is out of focus, the defect detection module 126 would determinethat the reference image set is out of focus, and the calibrating module128 would calibrate the first focusing step-to-focusing distancerelation according to a focusing step and a focusing distancecorresponding to a focus target in each of the image sets (step S605),so as to complete the calibration process. The detailed steps forcalibrating the first focusing step-to-focusing distance relation inStep S605 may refer to the related description in Step S307-317 of FIG.3 and may not be repeated herein.

The method for calibrating image deformation and image defocus asillustrated in FIG. 2 and FIG. 6 may be integrated into a method forcalibrating image defection of an image capturing device according to anembodiment in the invention as illustrated in FIG. 7.

Referring to FIG. 7, first, the image capturing module 122 captures aplurality of image sets by utilizing the first lens 10 a and the secondlens 10 b, where the image sets include a reference image set (stepS701). Descriptions for step S701 may refer to the related descriptionsin step S201, which may not be repeated hereinafter.

Next, the defect detection module 126 detects whether the referenceimage set is defective (step S703). That is, the defect detection module126 may determine whether the reference image set is defective due todistortion or displacement of the first lens 10 a, the second lens 10 b,or the focusing actuator 15. The detailed steps may refer to the relateddescription in FIG. 2 and FIG. 6 and may not be repeated herein.

When at least one of the first reference image and the second referenceimage is defective, the defect detection module 126 would determine thatthe reference image set is out of focus, and the calibrating module 128would calibrate the first focusing step-to-focusing distance relationaccording to a focusing step and a focusing distance corresponding to afocus target in each of the image sets (step S705), so as to completethe calibration process. The detailed steps for calibrating the firstfocusing step-to-focusing distance relation in Step S705 may refer tothe related description in Step S307-317 of FIG. 3 and may not berepeated herein.

FIG. 8 illustrates a block diagram of another image capturing deviceaccording to an embodiment of the invention.

Referring to FIG. 8, an image capturing device 800 includes a first lens810 a, a second lens 810 b, a focusing actuator 815, a storage unit 820,and one or more processing units 830, where the features of the firstlens 810 a, the second lens 810 b, the focusing actuator 815, thestorage unit 820, and the processing unit 830 are similar to the firstlens 10 a, the second lens 10 b, the focusing actuator 15, the storageunit 120, and the processing unit 130 as illustrated in FIG. 1 and maynot be repeated herein.

In the present embodiment, the storage unit 820 stores an imagecapturing module 822, a focusing module 824, a defect detection module826, and a calibrating module 828. The method for calibrating imagedefection of the image capturing device of FIG. 8 would be illustratedin the embodiment hereafter.

FIG. 9 and FIG. 9 are flowcharts illustrating two methods of calibratingimage defection of an image capturing device. The methods forcalibrating image defection of the image capturing device of FIG. 9 andFIG. 10 may be both implemented by the elements in the image capturingdevice 800 of FIG. 8.

In the embodiment illustrated in FIG. 9, the focusing actuator 815 wouldonly move the first lens 810 a during a focusing procedure. In otherwords, the first lens 810 a may be a zoom lens, and the second lens 810b may be a prime lens. Referring to FIG. 8 and FIG. 9, first, the imagecapturing module 122 captures a plurality of image sets by utilizing thefirst lens 810 a and the second lens 810 b, where the step of capturingeach of the image sets includes utilizing the focusing actuator 815 tomove the first lens 810 a so as to provide maximum clarity to a focustarget in each of the first images (Step S901). Next, the defectdetection module 826 obtains a focusing distance according to depthinformation of the focus target in each of the first images (Step S903).The calibrating module 828 calibrates the first focusingstep-to-focusing distance relation according to a focusing step and thefocusing distance corresponding to the focus target in each of the firstimages, where the focusing step corresponding to the focus target ineach of the image sets is the number of steps that the focusing actuatormoves the first lens 801 a for generating each of the first images (StepS905). The detailed steps of obtaining the images including the focustarget with maximum clarity by the image capturing modules 822,obtaining the focusing distance by the defect detection module 826according to the depth information of the focus target, and calibratingfirst focusing step-to-focusing distance relation by the calibratingmodule 828 may refer to the related descriptions of the image capturingdevice 100 and may not be repeated herein. The difference is that thesecond lens 810 b is fixed, and thus only the focusing distances and thedepth information corresponding to the first images would be used forcalibration.

On the other hand, in the embodiment illustrated in FIG. 10, thefocusing actuator 815 would move both the first lens 810 a and thesecond lens 810 b during a focusing procedure. Referring to both FIG. 8and FIG. 10, first, the image capturing module 122 captures a pluralityof image sets by utilizing the first lens 810 a and the second lens 810b, where the step of capturing each of the image sets includes utilizingthe focusing actuator 815 to move the first lens 810 a and the secondlens 810 b so as to provide maximum clarity to a focus target in each ofthe image sets (Step S1001). Next, the defect detection module 826obtains a focusing distance according to depth information of the focustarget in each of the image sets (Step S1003). The calibrating module828 calibrates the first focusing step-to-focusing distance relationaccording to a focusing step and the focusing distance corresponding tothe focus target in each of the image sets, where the focusing stepcorresponding to the focus target in each of the image sets is thenumber of steps that the focusing actuator moves the first lens and thesecond lens for generating each of the image sets (Step S1005). Thedetailed steps of obtaining the images including the focus target withmaximum clarity by the image capturing modules 822, obtaining thefocusing distance by the defect detection module 826 according to thedepth information of the focus target, and calibrating first focusingstep-to-focusing distance relation by the calibrating module 828 mayrefer to the related descriptions of the image capturing device 100 andmay not be repeated herein.

In summary, according to the image capturing device and the method forcalibrating the image defection thereof as proposed by the invention,when a deformation or an offset occurs on a first lens, a second lensand the focusing actuator of the image capturing device, the imagecapturing module is capable of calibrating the first focusingstep-to-focusing distance relation pre-stored in the image capturingdevice according to the focusing distance corresponding to the focustarget in each of the image sets captured by the first lens and thesecond lens as well as the focusing step that the focusing actuator isrequired to move the first lens and the second lens to the focusingposition. The image capturing device and the method for calibrating theimage defection thereof as proposed in the invention may allow for asimple and quick automatic calibration on the image capturing devicewithout even being noticed by the user, so as to ensure a stable qualityof the image capturing device and enhance user experience.

It will be apparent to those skilled in the art that variousmodifications and variations can be made to the structure of the presentdisclosure without departing from the scope or spirit of the disclosure.In view of the foregoing, it is intended that the present disclosurecover modifications and variations of this disclosure provided they fallwithin the scope of the following claims and their equivalents.

What is claimed is:
 1. A method for calibrating image defection, adaptedto an image capturing device having a first lens, a second lens, afocusing actuator, and a pre-stored first focusing step-to-focusingdistance relation ratio, comprising: capturing a plurality of image setsby utilizing the first lens and the second lens, wherein each of theimage sets comprises a first image corresponding to the first lens and asecond image corresponding to the second lens, and the image setscomprise a reference image set including a first reference imagecorresponding to the first lens and a second reference imagecorresponding to the second lens; detecting whether the reference imageset is out of focus by determining whether clarity values of the firstreference image and the second reference image are not greater than apredetermined clarity value, wherein the reference image set is detectedout of focus when at least one of the first reference image and thesecond reference image is out of focus; and when the reference image setis detected to be out of focus and when a focusing condition of theimage capturing device is a far focusing condition: recording a focusingstep corresponding to a focused target in each of the image set, whereinthe focusing step corresponding to the focused target in each of theimage sets is a number of steps that the focusing actuator is requiredto move the first lens and the second lens to a focusing position toprovide maximum clarity to a focused target in each of the image sets;when the focusing step corresponding to the focused target in each ofthe image sets reaches a convergent value, obtaining a minimum focusingstep and calculating a difference value between the minimum focusingstep and the convergent value; and calibrating the first focusing stepto focusing distance ratio according to the difference value; and whenthe reference image set is detected to be deformed and when a focusingcondition of the image capturing device is a near focusing condition:performing a three-dimensional depth estimation on each of the imagesets to generate depth information of the focused target in each of theimage sets; obtaining the focusing distance corresponding to the focusedtarget in each of the image sets according to each of the depthinformation; performing a regression according to the focusing distanceand the focusing step corresponding, to the focused target in each ofthe image sets; and calibrating the first focusing step-to-focusingdistance ratio according to a result of the regression.
 2. The methodfor calibrating image defection of claim 1, wherein the step ofcalibrating the first focusing step-to-focusing distance relation ratioaccording to the focusing step and the focusing distance correspondingto the focused target in each of the image sets comprises: setting thefocusing distance and the focusing step corresponding to the focusedtarget in each of the image sets as a data point; categorizing the datapoints into a plurality of neighboring data groups according to thefocusing distances; performing weighted average computation on the datapoints in each of the data groups to generate a weighted average datapoint corresponding to each of the neighboring data groups; andperforming the regression on the weighted average data points.
 3. Animage capturing device, comprising: a first lens; a second lens; afocusing actuator, coupled to the first lens and the second lens; astorage unit, recording a plurality of modules and a first focusingstep-to-focusing distance relation ratio; and one or more processingunits, coupled to the first lens, the second lens, the focusing actuatorand the storage unit, and accessing and executing the modules recordedin the storage unit, wherein the modules comprise: an image capturingmodule, capturing a plurality of image sets by utilizing the first lensand the second lens, wherein each of the image sets comprises a firstimage corresponding to the first lens and a second image correspondingto the second lens, and the image sets comprise a reference image setincluding a first reference image corresponding to the first lens and asecond reference image corresponding to the second lens; a focusingmodule, controlling the focusing actuator to move the first lens and thesecond lens to a focusing position; a defect detection module, detectingwhether the reference image set is out of focus, wherein when at leastone of the first reference image and the second reference image is outof focus, the defect detection module determines that the referenceimage set is out of focus; a condition detection module, detecting afocusing condition of the image capturing device, wherein the focusingcondition comprises a far focusing condition and a near focusingcondition; and a calibrating module, when the reference image set isdetected to be out of focus and when a focusing condition of the imagecapturing device is a far focusing condition: the calibrating modulerecords a focusing step corresponding to a focused target in each of theimage set, wherein the focusing step corresponding to the focused targetin each of the image sets is a number of steps that the focusingactuator is required to move the first lens and the second lens to afocusing position to provide maximum clarity to a focused target in eachof the image sets; and when the focusing step corresponding to thefocused target in each of the image sets reaches a convergent value, thecalibrating module obtains a minimum focusing step calculates adifference value between the minimum focusing step and the convergentvalue, and calibrates the first focusing step to focusing distance ratioaccording to the difference value; and when the reference image set isdetected to be deformed and when a focusing condition of the imagecapturing device is a near focusing condition: the calibrating moduleperforms the three-dimensional depth estimation on each of the imagesets to generate depth information of the focused target in each of theimage sets, obtains the focusing distance corresponding to the focusedtarget in each of the image sets according to each of the depthinformation, performs a regression according to the focusing distanceand the focusing step corresponding to the focused target in each of theimage sets, and calibrates the first focusing step-to-focusing distanceratio according to a result of the regression.
 4. The image capturingdevice of claim 3, wherein the calibrating module further sets thefocusing distance and the focusing step corresponding to the focusedtarget in each of the image sets as a data point, categorizes the datapoints into a plurality of neighboring data groups according to thefocusing distances, performs weighted average computation on the datapoints in each of the data groups to generate a weighted average datapoint corresponding to each of the neighboring data groups, and performsthe regression on the weighted average data points.
 5. A method forcalibrating image defection, adapted to an image capturing device havinga first lens, a second lens, a focusing actuator, and a pre-stored firstfocusing step-to-focusing distance ratio, comprising: capturing aplurality of image sets by utilizing the first lens and the second lens,wherein each of the image sets comprises a first image corresponding tothe first lens and a second image corresponding to the second lens, andwherein the step of capturing each of the image sets comprises utilizingthe focusing actuator to move the first lens so as to provide maximumclarity to a focused target in each of the first images; obtaining afocusing distance according to depth information of the focused targetin each of the first images; and calibrating the first focusingstep-to-focusing distance ratio according to a focusing step and thefocusing distance corresponding to the focused target in each of thefirst images, wherein the focusing step corresponding to the focusedtarget in each of the first images is the number of steps that thefocusing actuator moves the first lens to provide maximum clarity to thefocused target in each of the first images; wherein when a focusingcondition of the image capturing device is a far focusing condition, thestep of calibrating the first focusing step-to-focusing distance ratiocomprising: when the focusing step corresponding to the focused targetin each of the first images reaches a convergent value, obtaining aminimum focusing step and calculating a difference value between theminimum focusing step and the convergent value; and calibrating thefirst focusing step to focusing distance ratio according to thedifference value; and wherein when the focusing condition of the imagecapturing device is a near focusing condition, the step of calibratingthe first focusing step-to-focusing distance ratio comprising:performing a three-dimensional depth estimation on each of the imagesets to generate depth information of the focused target in each of thefirst images; obtaining the focusing distance corresponding to thefocused target in each of the first images according to each of thedepth information; performing a regression according to the focusingdistance and the focusing step corresponding to the focused target ineach of the first images; and calibrating the first focusingstep-to-focusing distance ratio according to a result of the regression.6. An image capturing device comprising: a first lens; a second lens; afocusing actuator, coupled to the first lens and the second lens; astorage unit, recording a plurality of modules and a first focusingstep-to-focusing distance ratio; and one or more processing units,coupled to the first lens, the second lens, the focusing actuator andthe storage unit, and accessing and executing the modules recorded inthe storage unit, wherein the modules comprise: an image capturingmodule, capturing a plurality of image sets by utilizing the first lensand the second lens, wherein each of the image sets comprises a firstimage corresponding to the first lens and a second image correspondingto the second lens; a focusing module, controlling the focusing actuatorto move the first lens so as to provide maximum clarity to a focusedtarget in each of the first images; a defect detection module, obtaininga focusing distance according to depth information of the focused targetin each of the first images; a condition detection module, detecting afocusing condition of the image capturing device, wherein the focusingcondition comprises a far focusing condition and a near focusingcondition; and a calibrating module, calibrating the first focusingstep-to-focusing distance ratio according to a focusing step and thefocusing distance corresponding to the focused target in each of thefirst images, wherein the focusing step corresponding to the focusedtarget in each of the first images is the number of steps that thefocusing actuator moves the first lens to provide maximum clarity to thefocused target in each of the first images, wherein when the focusingcondition of the image capturing device is the far focusing condition,when the focusing step corresponding to the focused target in each ofthe first images reaches a convergent value, the calibrating moduleobtains a minimum focusing step, calculates a difference value betweenthe minimum focusing step and the convergent value, and calibrates thefirst focusing step to focusing distance ratio according to thedifference value, and wherein when the focusing condition of the imagecapturing device is the near focusing condition, the calibrating moduleperforms the three-dimensional depth estimation on each of the imagesets to generate depth information of the focused target in each of thefirst images, obtains the focusing distance corresponding to the focusedtarget in each of the first images according to each of the depthinformation, performs a regression according to the focusing distanceand the focusing step corresponding to the focused target in each of thefirst images, and calibrates the first focusing step-to-focusingdistance ratio according to a result of the regression.